<html>
<head><meta charset="utf-8"><title>cmd-line flag to disable rustfmt · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cmd-line.20flag.20to.20disable.20rustfmt.html">cmd-line flag to disable rustfmt</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="200138457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cmd-line%20flag%20to%20disable%20rustfmt/near/200138457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Natalie Popescu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cmd-line.20flag.20to.20disable.20rustfmt.html#200138457">(Jun 08 2020 at 18:35)</a>:</h4>
<p>Is there a commandline flag for cargo that lets me disable the rustfmt functionality? I am trying to test some crates with a locally modified compiler (used as rustup toolchain) and it doesn't support installing such components</p>



<a name="200138605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cmd-line%20flag%20to%20disable%20rustfmt/near/200138605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cmd-line.20flag.20to.20disable.20rustfmt.html#200138605">(Jun 08 2020 at 18:36)</a>:</h4>
<p>You mean like doctests?</p>



<a name="200138667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cmd-line%20flag%20to%20disable%20rustfmt/near/200138667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cmd-line.20flag.20to.20disable.20rustfmt.html#200138667">(Jun 08 2020 at 18:36)</a>:</h4>
<p>Usually I just build rustdoc as well. <code>./x.py --stage=1 build</code> should give you what you need.</p>



<a name="200286949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cmd-line%20flag%20to%20disable%20rustfmt/near/200286949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Natalie Popescu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cmd-line.20flag.20to.20disable.20rustfmt.html#200286949">(Jun 09 2020 at 20:38)</a>:</h4>
<p>I mean running <code>cargo test</code> in general. I've built the rustdoc like so <code>./x.py doc</code> (after building stage2), but when I go to add rustfmt to it (<code>rustup component add rustfmt --toolchain stage2</code>) I get: <code>error: toolchain 'stage2' does not support components</code></p>



<a name="200315444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cmd-line%20flag%20to%20disable%20rustfmt/near/200315444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cmd-line.20flag.20to.20disable.20rustfmt.html#200315444">(Jun 10 2020 at 03:01)</a>:</h4>
<p>You need to build rustfmt with x.py</p>



<a name="200315447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cmd-line%20flag%20to%20disable%20rustfmt/near/200315447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cmd-line.20flag.20to.20disable.20rustfmt.html#200315447">(Jun 10 2020 at 03:01)</a>:</h4>
<p>Not sure the command for that</p>



<a name="200320567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cmd-line%20flag%20to%20disable%20rustfmt/near/200320567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cmd-line.20flag.20to.20disable.20rustfmt.html#200320567">(Jun 10 2020 at 05:27)</a>:</h4>
<p>I think that would be <code>x.py build --stage=0 src/tools/rustfmt</code></p>



<a name="200503455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cmd-line%20flag%20to%20disable%20rustfmt/near/200503455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Natalie Popescu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cmd-line.20flag.20to.20disable.20rustfmt.html#200503455">(Jun 11 2020 at 03:48)</a>:</h4>
<p>ahh awesome thats what i'm looking for, thanks!!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>